home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / OpenGL 1.0 SDK / Source / Libraries / glut / glut_fullscrn.c < prev    next >
Encoding:
C/C++ Source or Header  |  1999-05-18  |  827 b   |  35 lines  |  [TEXT/CWIE]

  1.  
  2. /* Copyright (c) Mark J. Kilgard, 1995. */
  3.  
  4. /* This program is freely distributable without licensing fees 
  5.    and is provided without guarantee or warrantee expressed or 
  6.    implied. This program is -not- in the public domain. */
  7.  
  8. #include <stdlib.h>
  9.  
  10. #include "gl.h"
  11. #include "agl.h"
  12. #include "glut.h"
  13. #include "glutint.h"
  14.  
  15. void glutFullScreen(void)
  16. {
  17.     int w, h;
  18.  
  19.     if(!__glutCurrentWindow)
  20.     {
  21.         __glutWarning("glutFullScreen: no active window");
  22.         return;
  23.     }
  24.     
  25.     if(__glutCurrentWindow->fullscreen) return;
  26.  
  27.     w = abs(qd.screenBits.bounds.right - qd.screenBits.bounds.left);
  28.     h = abs(qd.screenBits.bounds.bottom - qd.screenBits.bounds.top);
  29.  
  30.     SizeWindow((GrafPort *) __glutCurrentWindow->win, w, h, GL_FALSE);
  31.  
  32.     __glutWindowReshape(__glutCurrentWindow, w, h);
  33.     __glutPutOnWorkList(__glutCurrentWindow, GLUT_REDISPLAY_WORK);
  34. }
  35.